local ClientOHOH = _G.ClientOHOH;

local M = ClientOHOH.class.new(script, ClientOHOH.files.OHOHOLYBUIBase());
local CallBackManager = ClientOHOH.load.CallBackManager();
local CommonOHOH =_G.CommonOHOH
local ConnectClass=CommonOHOH.load.Connect();

function InitInsts(ui)
	ui.insts = {};
	ui.insts.Buy = "ctrl.btn_buy";
	ui.insts.Close = "ctrl.btn_later";
	ui.insts.Price = "ctrl.price";

    ui.insts.weapon = "ctrl.weapon";
    ui.insts.wins = "ctrl.wins";
    ui.insts.diamond = "ctrl.diamond";
    ui.insts.pet = "ctrl.pet";


end

function M.new(...)
	return M(...);
end;

function M.FullInsts(self)
    self:Full_2()
end

function M.ctor(self)
	self.BuyEvent=ConnectClass.new() --购买

	InitInsts(self)
	M.super.ctor(self, ClientOHOH:GetPath_Loop("ReplicatedStorage.Resource.UI.StartPackGui"));
	CallBackManager:AddRbxConnect(self, self.insts.Close.Activated, function()
		self:Hide()
	end);
	CallBackManager:AddRbxConnect(self, self.insts.Buy.Activated, function()
			self.BuyEvent:Action()
	end);
end;



function M.FullData(self,weapon,wins,diamond,pet,price)

    self:FullText(self.insts.weapon,{weapon})
    self:FullText(self.insts.wins,{wins})
    self:FullText(self.insts.diamond,{diamond})
    self:FullText(self.insts.pet,{pet})
    self.insts.Price.Text=price
end

function M.dtor(self)
	M.super.dtor(self);
end;

return M
